<template>
  <Layout>
    <!-- Page Header -->
    <header class="masthead" style="background-image: url('/img/post-bg.jpg')">
        <div class="overlay"></div>
        <div class="container">
        <div class="row">
            <div class="col-lg-8 col-md-10 mx-auto">
            <div class="post-heading">
                <h1>{{ $page.post.title }}</h1>
                <!-- <h2 class="subheading">Problems look mighty small from 150 miles up</h2> -->
                <span class="meta">Posted by
                <a href="#">Start Bootstrap</a>
                on {{$page.post.created_at}}</span>
            </div>
            </div>
        </div>
        </div>
    </header>

    <!-- Post Content -->
    <article>
        <div class="container">
          <div class="row">
              <div class="col-lg-8 col-md-10 mx-auto" v-html="$page.post.content"></div>
              <div>
              <span class="tag" v-for="tag in $page.post.tags" :key="tag.id">
                <g-link href="">{{ tag.title }}</g-link>
              </span>
            </div>
          </div>
        </div>
    </article>
  </Layout>
</template>

<page-query>
  query ($id: ID!) {
    post: strapiPost (id: $id) {
      id
      title
      content
      created_at
      cover {
        url
      }
      tags {
        id
        title
      }
    }
  }
</page-query>

<script>

  export default {
    name:'PostPage',
    data () {
      return {

      };
    },

    mounted() {},

    methods: {},

    watch: {}

  }

</script>
<style>

</style>